package cn.bdqn.controller;

import cn.bdqn.pojo.Brand;
import cn.bdqn.service.BrandService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/brand")
public class BrandController {
    @Resource
    BrandService service;
    @ResponseBody
    @RequestMapping("/selectAll")
    public Object selectAll(){
        List<Brand> brands = service.selectList();
        return brands;
    }
}
